﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AMEC.PCSoftware.RemoteConsole.CrazyHein.MitsubishiControllerWorks.Tool.Ohestren
{
    public enum RJ71DN91_ADDRESS_TABLE
    {
        X_WATCHDOG_TIMER_ERROR = 0x00,
        X_IO_COMMUNICATING = 0x01,
        X_MESSAGE_COMMUNICATION_COMPLETION = 0x02,
        X_MASTER_FUNCTION_ERROR_SET_SIGNAL = 0x03,
        X_SLAVE_DOWN_SIGNAL = 0x04,
        X_MESSAGE_COMMUNICATION_ERROR = 0x05,
        X_PARAMETER_SAVING = 0x06,
        X_PARAMETER_SAVE_COMPLETION = 0x07,
        X_SLAVE_FUNCTION_ERROR_SET_SIGNAL = 0x08,
        X_HARDWARE_TESTING = 0x0A,
        X_HARDWARE_TEST_COMPLETION = 0x0B,
        X_HARDWARE_TEST_ERROR = 0x0C,
        X_MODULE_READY = 0x0F,
        X_AUTO_CONFIGURATION_EXECUTING = 0x14,
        X_AUTO_CONFIGURATION_COMPLETION = 0x15,

        Y_IO_COMMUNICATION_REQUEST = 0x11,
        Y_MESSAGE_COMMUNICATION_REQUEST = 0x12,
        Y_MASTER_FUNCTION_ERROR_RESET_REQUEST = 0x13,
        Y_AUTO_CONFIGURATION_REQUEST = 0x14,
        Y_PARAMETER_SAVE_REQUEST = 0x17,
        Y_SLAVE_FUNCTION_ERROR_RESET_REQUEST = 0x18,

        BUF_MESSAGE_COMMUNICATION_COMMAND_HEAD = 272,
        BUF_MESSAGE_COMMUNICATION_RESULT_HEAD = 288,	//288 to 303
        BUF_MESSAGE_COMMUNICATION_DATA = 304,	//304 to 423

        BUF_MASTER_FUNCTION_COMMUNICATION_STATUS = 432,
        BUF_MASTER_FUNCTION_ERROR_INFO = 433,

        BUF_MASTER_CONSTANT_SCAN = 471,
        BUF_1ST_SLAVE_NODE_PARAM = 472,

        BUF_NODE0_COMMUNICATION_ERROR_CODE = 1154,

        BUF_CURRENT_LINK_SCAN_TIME = 1532,
        BUF_MINIMUM_LINK_SCAN_TIME = 1533,
        BUF_MAXIMUM_LINK_SCAN_TIME = 1534,

        BUF_MODEL_DISPLAY01 = 1568,
        BUF_MODEL_DISPLAY23 = 1569,
        BUF_MODEL_DISPLAY45 = 1570,
        BUF_MODEL_DISPLAY67 = 1571,
        BUF_MODEL_DISPLAY89 = 1572,
        BUF_NODE_ADDRESS = 1573,
        BUF_MODE_SWITCH_NUMBER = 1574,

        BUF_OPERATION_SETTING_FOR_BUS_ERROR = 1586,
        BUF_DATA_CONSISTENCY_SETTING = 1587,
        BUF_DATA_CONSISTENCY_SETTING_STATUS = 1588,

        BUF_MASTER_RECEIVE_DATA_HEAD = 0x700,
        BUF_MASTER_TRANSMIT_DATA_HEAD = 0x900,

        BUF_SLAVE_RECEIVE_DATA_HEAD = 0xB00,
        SLAVE_TRANSMIT_DATA_HEAD = 0xC00,

        MESSAGE_DATA_SIZE_IN_BYTE = 240
    }

    public enum QJ71DN91_ADDRESS_TABLE
    {
        X_WATCHDOG_TIMER_ERROR = 0x00,
        X_IO_COMMUNICATING = 0x01,
        X_MESSAGE_COMMUNICATION_COMPLETION = 0x02,
        X_MASTER_FUNCTION_ERROR_SET_SIGNAL = 0x03,
        X_SLAVE_DOWN_SIGNAL = 0x04,
        X_MESSAGE_COMMUNICATION_ERROR = 0x05,
        X_PARAMETER_SAVING = 0x06,
        X_PARAMETER_SAVE_COMPLETION = 0x07,
        X_SLAVE_FUNCTION_ERROR_SET_SIGNAL = 0x08,
        X_HARDWARE_TESTING = 0x0A,
        X_HARDWARE_TEST_COMPLETION = 0x0B,
        X_HARDWARE_TEST_ERROR = 0x0C,
        X_MODULE_READY = 0x0F,
        X_AUTO_CONFIGURATION_EXECUTING = 0x14,
        X_AUTO_CONFIGURATION_COMPLETION = 0x15,

        Y_IO_COMMUNICATION_REQUEST = 0x11,
        Y_MESSAGE_COMMUNICATION_REQUEST = 0x12,
        Y_MASTER_FUNCTION_ERROR_RESET_REQUEST = 0x13,
        Y_AUTO_CONFIGURATION_REQUEST = 0x14,
        Y_PARAMETER_SAVE_REQUEST = 0x17,
        Y_SLAVE_FUNCTION_ERROR_RESET_REQUEST = 0x18,

        BUF_MESSAGE_COMMUNICATION_COMMAND_HEAD = 272,
        BUF_MESSAGE_COMMUNICATION_RESULT_HEAD = 288,	//288 to 303
        BUF_MESSAGE_COMMUNICATION_DATA = 304,	//304 to 423

        BUF_MASTER_FUNCTION_COMMUNICATION_STATUS = 432,
        BUF_MASTER_FUNCTION_ERROR_INFO = 433,

        BUF_MASTER_CONSTANT_SCAN = 471,
        BUF_1ST_SLAVE_NODE_PARAM = 472,

        BUF_NODE0_COMMUNICATION_ERROR_CODE = 1154,

        BUF_CURRENT_LINK_SCAN_TIME = 1532,
        BUF_MINIMUM_LINK_SCAN_TIME = 1533,
        BUF_MACIMUM_LINK_SCAN_TIME = 1534,

        BUF_MODEL_DISPLAY01 = 1568,
        BUF_MODEL_DISPLAY23 = 1569,
        BUF_MODEL_DISPLAY45 = 1570,
        BUF_MODEL_DISPLAY67 = 1571,
        BUF_MODEL_DISPLAY89 = 1572,
        BUF_NODE_ADDRESS = 1573,
        BUF_MODE_SWITCH_NUMBER = 1574,

        BUF_OPERATION_SETTING_FOR_BUS_ERROR = 1586,
        BUF_DATA_CONSISTENCY_SETTING = 1587,
        BUF_DATA_CONSISTENCY_SETTING_STATUS = 1588,

        BUF_MASTER_RECEIVE_DATA_HEAD = 0x700,
        BUF_MASTER_TRANSMIT_DATA_HEAD = 0x900,

        BUF_SLAVE_RECEIVE_DATA_HEAD = 0xB00,
        SLAVE_TRANSMIT_DATA_HEAD = 0xC00,

        MESSAGE_DATA_SIZE_IN_BYTE = 240
    }
}
